﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BusinessLogicLayer;

namespace logicunivesityinventorystore.Store
{
    public partial class ViewPurchasedOrders : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnView_Click(object sender, EventArgs e)
        {
            //gv_PurchaseOrders.DataSource = new OrderFacade().FindPurchasedOrderBySupplier(ddlsuppliers.SelectedValue);
            //gv_PurchaseOrders.DataBind();

        }

        protected void gv_PurchaseOrders_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if(e.CommandName == "Select")
            {
                gv_OrderDetails.DataSource = new OrderFacade().FindOrderDetailsByID(e.CommandArgument.ToString());
                gv_OrderDetails.DataBind();
            }
        }
    }
}